if(location.href.indexOf('prodDet')>-1){
$(function(){
if($('.btn_card').length>0)
{
alert($('.btn_card').hasClass('disable'));
if($('.btn_card').hasClass('disable'))
{
$('.btn_card').removeClass('disable').on('click',function(){
var j_captchaValue =$("#j_captcha").val();
			if(j_captchaValue==""){
				$("#dh_fial1").removeClass('none');
				return "";
			}
			i+=1;
			if(i>1) return;
			$("#dh_ing").removeClass('none');
			jQuery.ajax({
    				type:"POST",
            		data:{'prodId':(new Date()).getDay(),'j_captcha':j_captchaValue},
    				url:contextPath + "/activityday/goOrder.jhtml?temp="+(new Date()).getTime(),
            		success: function(data){
            			if(data.result=='1'){//图片验证不通过
							$("#dh_ing").addClass('none');
							var imgSrc = "/promotion/activitydaycaptcha.jhtml?timestamp="+(new Date()).getTime();
							$("#imgAsynchHttpReqArea").attr("src",imgSrc);
    						$("#dh_fial2").removeClass('none');
							i=0;
            			}
    					if(data.result=='2'){//库存已经抢光
							$("#dh_ing").addClass('none');
							var imgSrc = "/promotion/activitydaycaptcha.jhtml?timestamp="+(new Date()).getTime();
							$("#imgAsynchHttpReqArea").attr("src",imgSrc);
    						$("#dh_fial4").removeClass('none');
							i=0;
    					}
    					if(data.result=='3'){//你今天已经下过单
							$("#dh_ing").addClass('none');
							var imgSrc = "/promotion/activitydaycaptcha.jhtml?timestamp="+(new Date()).getTime();
							$("#imgAsynchHttpReqArea").attr("src",imgSrc);
							$("#dh_fial5").removeClass('none');
							i=0;
    					}
						if(data.result=='5'){//卡列表不满足条件
							$("#dh_ing").addClass('none');
							var imgSrc = "/promotion/activitydaycaptcha.jhtml?timestamp="+(new Date()).getTime();
							$("#imgAsynchHttpReqArea").attr("src",imgSrc);
							$("#dh_fial3").removeClass('none');
							i=0;
    					}
    					if(data.result=='4'){//成功放入下单队列
							 interval=self.setInterval("queryOrderResult()",5*1000);  //1秒
    					}
            		}
			});
});
}
}
});
}